package cn.logicalthing.demo.web.error;

public enum CommonErrorCode implements ErrorCode {
    //=========== 和商品相关状态码统一 (1000-2000)之间====================
    E_9999(9999, "系统错误!"),
    E_1000(1000, "添加商品发生错误!"),
    E_1001(1001, "添加商品缺少必要参数!"),
    E_2000(2000, "购物车异常"),
    E_2001(2001, "添加商品至购物车发生错误！"),
    E_2002(2002, "从购物车移除商品发生错误"),
    E_3001(3001, "发货单添加失败!"),
    E_3002(3002, "缺少必要参数!"),
    E_3003(3003, "该订单不存在!"),
    E_3004(3004, "收货单添加失败!"),
    E_3005(3005, "收货确认失败!"),
    E_3006(3005, "地址添加失败!"),
    ;

    private int code;

    private String message;

    CommonErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
